
enum Gender{
   unkown(0,'未知'),
   male(1,'男'),
   female(2,'女'),
  ;

  final num value;
  final String desc;

  const Gender(this.value,this.desc);

  static Gender findById(num value){
    return Gender.values.firstWhere((element) => element.value==value,orElse:()=> unkown);
  }
  static Gender findByDesc(String desc){
    return Gender.values.firstWhere((element) => element.desc==desc,orElse:()=> unkown);
  }

}